package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LightningWarnMapper;
import com.ruoyi.system.domain.LightningWarn;
import com.ruoyi.system.service.ILightningWarnService;

/**
 * 雷电预警上报市局-来自lightning_dataService业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-03
 */
@Service
public class LightningWarnServiceImpl implements ILightningWarnService 
{
    @Autowired
    private LightningWarnMapper lightningWarnMapper;

    /**
     * 查询雷电预警上报市局-来自lightning_data
     * 
     * @param id 雷电预警上报市局-来自lightning_data主键
     * @return 雷电预警上报市局-来自lightning_data
     */
    @Override
    public LightningWarn selectLightningWarnById(Long id)
    {
        return lightningWarnMapper.selectLightningWarnById(id);
    }

    /**
     * 查询雷电预警上报市局-来自lightning_data列表
     * 
     * @param lightningWarn 雷电预警上报市局-来自lightning_data
     * @return 雷电预警上报市局-来自lightning_data
     */
    @Override
    public List<LightningWarn> selectLightningWarnList(LightningWarn lightningWarn)
    {
        return lightningWarnMapper.selectLightningWarnList(lightningWarn);
    }

    /**
     * 新增雷电预警上报市局-来自lightning_data
     * 
     * @param lightningWarn 雷电预警上报市局-来自lightning_data
     * @return 结果
     */
    @Override
    public int insertLightningWarn(LightningWarn lightningWarn)
    {
        lightningWarn.setCreateTime(DateUtils.getNowDate());
        return lightningWarnMapper.insertLightningWarn(lightningWarn);
    }

    /**
     * 修改雷电预警上报市局-来自lightning_data
     * 
     * @param lightningWarn 雷电预警上报市局-来自lightning_data
     * @return 结果
     */
    @Override
    public int updateLightningWarn(LightningWarn lightningWarn)
    {
        lightningWarn.setUpdateTime(DateUtils.getNowDate());
        return lightningWarnMapper.updateLightningWarn(lightningWarn);
    }

    /**
     * 批量删除雷电预警上报市局-来自lightning_data
     * 
     * @param ids 需要删除的雷电预警上报市局-来自lightning_data主键
     * @return 结果
     */
    @Override
    public int deleteLightningWarnByIds(Long[] ids)
    {
        return lightningWarnMapper.deleteLightningWarnByIds(ids);
    }

    /**
     * 删除雷电预警上报市局-来自lightning_data信息
     * 
     * @param id 雷电预警上报市局-来自lightning_data主键
     * @return 结果
     */
    @Override
    public int deleteLightningWarnById(Long id)
    {
        return lightningWarnMapper.deleteLightningWarnById(id);
    }
}
